#include<iostream>
int main(){
    using namespace std;
    float hats, heads;
    // ios_base::fixed表示：用正常的记数方法显示浮点数(与科学计数法相对应)；ios_base::floatfield表示小数点后保留6位小数。
    cout.setf(ios_base::fixed, ios_base::floatfield);

    cout << "Enter a number: ";
    cin >> hats;
    cout << "Enter another number: ";
    cin >> heads;

    // 对于float c++只保证6位有效
    cout << "hats = " << hats << "; heads = " << heads << endl;
    cout << "hats + heads = " << hats + heads << endl;
    cout << "hats - heads = " << hats - heads << endl;
    cout << "hats * heads = " << hats * heads << endl;
    cout << "hats / heads = " << hats / heads << endl;
    return 0;
}